package com.example.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 本文来演示
 *
 * @author 赵建云
 * @create 2023/10/21
 */
public interface ClickLikeMapper {
    @Insert("insert into click_like(js_id, click_id, click_identification) value(#{jsId},#{clickId},#{clickIdentification})")
    int save(@Param("jsId") Integer jsId,@Param("clickId") String clickId,@Param("clickIdentification") Integer clickIdentification);
    @Delete("delete from click_like where js_id=#{jsId} and click_id=#{clickId} and click_identification=#{clickIdentification}")
    int del(@Param("jsId") Integer jsId,@Param("clickId") String clickId,@Param("clickIdentification") Integer clickIdentification);

    @Select("select click_id from click_like where js_id=#{jsId} and click_identification=#{clickIdentification}")
    List<String> searchClick(@Param("jsId") Integer jsId,@Param("clickIdentification") Integer clickIdentification);
}
